<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let age = 33;
        console.log(typeof age);

        // 1,number转化为字符串
        age = age.toString();
        console.log(typeof age);

        // 2.强制转换
        let score = String(199);
        console.log(typeof score);

        //     3.ptompt() 接受数据作为字符串
        let year = prompt('请输入你的生日');
        console.log(typeof year);
    </script>
</body>

</html>